home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Tools / Mac / Startups / Startup•ODF next >
Encoding:
Text File  |  1996-04-25  |  6.8 KB  |  211 lines  |  [TEXT/MPS ]

  1. #========================================================================================
  2. #
  3. #    File:                ODF Startup
  4. #    Release Version:    $ ODF 1 $
  5. #
  6. #    Copyright:    (c) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  7. #
  8. #========================================================================================
  9.  
  10. # Set the location of the OpenDoc SDK Folder
  11. # If the folder can't be found; automatically prompts user for it and
  12. # remember where the folder was found
  13.  
  14. # FWOpenDocSDK assumes that all the OpenDoc stuff is in one folder. This
  15. # isn't true for third-party CDs. Therefore we need to migrate to two
  16. # variables, one for the headers, one for the libraries.
  17.  
  18. # Backwards compatability for FWOpenDocSDK_Folder
  19. If `Exists "{PrefsFolder}"FWOpenDocSDK_Folder`
  20.     Set FWOpenDocSDK "`Catenate "{PrefsFolder}"FWOpenDocSDK_Folder`"
  21.     Delete "{PrefsFolder}FWOpenDocSDK_Folder"
  22. End
  23. If "{FWOpenDocSDK}" != ""
  24.     Set FWOpenDocInterfaces "{FWOpenDocSDK}Interfaces:"
  25.     Set FWOpenDocLibraries "{FWOpenDocSDK}Libraries:"
  26.     Echo -n "{FWOpenDocInterfaces}" > "{PrefsFolder}FWOpenDocInterfaces"
  27.     Echo -n "{FWOpenDocLibraries}" > "{PrefsFolder}FWOpenDocLibraries"
  28.     Unexport FWOpenDocSDK
  29.     Unset FWOpenDocSDK
  30. End
  31.  
  32. # Restore FWOpenDocInterfaces and FWOpenDocLibraries
  33. If ¬ "{FWOpenDocInterfaces}" && "`Exists "{PrefsFolder}"FWOpenDocInterfaces`" 
  34.     Set FWOpenDocInterfaces "`Catenate "{PrefsFolder}"FWOpenDocInterfaces`"
  35.     Set FWOpenDocLibraries     "`Catenate "{PrefsFolder}"FWOpenDocLibraries`"
  36. End
  37.  
  38. # Verify FWOpenDocInterfaces and FWOpenDocLibraries
  39. If ¬ "`Exists "{PrefsFolder}"FWOpenDocInterfaces`" || ¬ "`Exists "{FWOpenDocInterfaces}"`" ∂
  40.         || ¬ "`Exists "{PrefsFolder}"FWOpenDocLibraries`" || ¬ "`Exists "{FWOpenDocLibraries}"`"
  41.     Set Exit 0
  42.     Set temp "{Boot}"
  43.     Loop
  44.         Set temp "`(GetFileName "{temp}" -q -d -m "Find “OpenDoc SDK”") ≥ Dev:Null`"
  45.         If ¬ "{temp}"
  46.             Exit
  47.         End
  48.         # Is this the DR4 OpenDoc SDK?
  49.         If `Exists "{temp}Interfaces:"`
  50.             Set FWOpenDocInterfaces "{temp}Interfaces:"
  51.             Set FWOpenDocLibraries "{temp}Libraries:PEF:"
  52.             Echo -n "{FWOpenDocInterfaces}" > "{PrefsFolder}FWOpenDocInterfaces"
  53.             Echo -n "{FWOpenDocLibraries}" > "{PrefsFolder}FWOpenDocLibraries"
  54.             Break
  55.         # Other test for the DR4 OpenDoc SDK
  56.         Else If `Exists "{temp}Handmade:" ≥ Dev:Null` && `Exists "{temp}:Libraries:" ≥ Dev:Null`
  57.             Set FWOpenDocInterfaces "{temp}"
  58.             Set FWOpenDocLibraries "{temp}:Libraries:PEF:"
  59.             Echo -n "{FWOpenDocInterfaces}" > "{PrefsFolder}FWOpenDocInterfaces"
  60.             Echo -n "{FWOpenDocLibraries}" > "{PrefsFolder}FWOpenDocLibraries"
  61.             Break
  62.         # CW8
  63.         Else If `Exists "{temp}Handmade:" ≥ Dev:Null` && `Exists "{temp}::Libraries:OpenDoc:" ≥ Dev:Null`
  64.             Set FWOpenDocInterfaces "{temp}"
  65.             Set FWOpenDocLibraries "{temp}::Libraries:OpenDoc:"
  66.             Echo -n "{FWOpenDocInterfaces}" > "{PrefsFolder}FWOpenDocInterfaces"
  67.             Echo -n "{FWOpenDocLibraries}" > "{PrefsFolder}FWOpenDocLibraries"
  68.             Break
  69.         Else
  70.             Alert “{temp}” isn’t the OpenDoc SDK folder.
  71.         End
  72.     End
  73.     Set Exit 1
  74. End
  75.  
  76. Set FWOpenDocInterfaces "`Catenate "{PrefsFolder}"FWOpenDocInterfaces`"
  77. Export FWOpenDocInterfaces
  78. Set FWOpenDocLibraries     "`Catenate "{PrefsFolder}"FWOpenDocLibraries`"
  79. Export FWOpenDocLibraries
  80.  
  81. #    {FWODHandMadeIncludes} - The path to the OpenDoc HandMade Includes Folder.
  82.         Set FWODHandMadeIncludes "{FWOpenDocInterfaces}HandMade:"
  83.         Export FWODHandMadeIncludes
  84.  
  85. #    {FWODIDLIncludes} - The path to the OpenDoc Includes Folder.
  86.         Set FWODIDLIncludes "{FWOpenDocInterfaces}IDL:"
  87.         Export FWODIDLIncludes
  88.  
  89. #    {FWODCppIncludes} - The path to the OpenDoc CPlusCPlus Includes Folder.
  90.         Set FWODCppIncludes "{FWOpenDocInterfaces}CPlusPlus:"
  91.         Export FWODCppIncludes
  92.  
  93. #    {FWODPublicUtilitiesIncludes} - The path to the OpenDoc Public Utilities Includes Folder.
  94.         Set FWODPublicUtilitiesIncludes "{FWOpenDocSDK}OpenDoc Utilities:Interfaces:"
  95.         Export FWODPublicUtilitiesIncludes
  96.  
  97. #    {FWODRIncludes} - The path to the OpenDoc RIncludes Folder.
  98.         Set FWODRIncludes "{FWOpenDocInterfaces}Rez:"
  99.         Export FWODRIncludes
  100.  
  101. #    {FWCWCppPPCName} - The name to the CodeWarrior IDE.
  102.         Set FWCWCppPPCName ""
  103.         Export FWCWCppPPCName
  104.  
  105. ################################################################################
  106. # Stuff you probably don't want to mess with
  107. ################################################################################
  108.  
  109. #    {FWLibDir} - The path to the ODF Libraries Folder.
  110. if ¬ "{FWLibDir}"
  111.         Set FWLibDir "{ODF}"Lib:
  112.         Export FWLibDir
  113. end
  114.  
  115. #    {FWBinDir} - The path to the ODF Binaries Folder.
  116. if ¬ "{FWBinDir}"
  117.         Set FWBinDir "{ODF}"Bin:
  118.         Export FWBinDir
  119. end
  120.  
  121. #    {FWObjDir} - The path to the ODF Objects Folder.
  122. if ¬ "{FWObjDir}"
  123.         Set FWObjDir "{ODF}"Obj:
  124.         Export FWObjDir
  125. end
  126.  
  127. #    {FWToolsDir} - The path to other ODF Tools Folder
  128. if ¬ "{FWToolsDir}"
  129.         Set FWToolsDir "{ODF}"Tools:Mac:
  130.         Export FWToolsDir
  131. end
  132.         
  133. #    {FWMakefileName} - The Name of FWBuild's MakeFiles
  134. if ¬ "{FWMakefileName}"
  135.         Set FWMakefileName "MacMake"
  136.         Export FWMakefileName
  137. end
  138.  
  139. #    {FWMakefileExt} - The extension of FWBuild's MakeFiles
  140. if ¬ "{FWMakefileExt}"
  141.         Set FWMakefileExt ".bmk"
  142.         Export FWMakefileExt
  143. end
  144.  
  145. #    {FWTempDir} - The Location for FWBuild's temporary files
  146. if ¬ "{FWTempDir}"
  147.         Set FWTempDir "{MPW}"
  148.         Export FWTempDir
  149. end
  150.  
  151. #    {FWTempExt} - The extension for FWBuild's temporary files
  152. if ¬ "{FWTempExt}"
  153.         Set FWTempExt ".tmp"
  154.         Export FWTempExt
  155. end
  156.  
  157. #    {FWAutoTargets} - The name of the auto-targets file
  158. if ¬ "{FWAutoTargets}"
  159.         Set FWAutoTargets "{FWToolsDir}"autotarg.txt
  160.         Export FWAutoTargets
  161. end
  162.  
  163. #    {FWPreMake} - The name of FWBuild's Premake file
  164. if ¬ "{FWPreMake}"
  165.         Set FWPreMake "{FWToolsDir}"MacMake.dfn
  166.         Export FWPreMake
  167. end
  168.  
  169. #    {FWPostMake} - The name of FWBuild's Premake file
  170. if ¬ "{FWPostMake}"
  171.         Set FWPostMake "{FWToolsDir}"MacMake.rul
  172.         Export FWPostMake
  173. end
  174.  
  175. #    {ODFDev} - The name of the Fodler Containing ODF
  176. if ¬ "{ODFDev}"
  177.         Set ODFDev "{ODF}:"
  178.         Export ODFDev
  179. end
  180.  
  181. #    {CFM68KLibraries} - Directory that contains CFM-68K static link libraries.         
  182. if ¬ "{CFM68KLibraries}"
  183.             Set CFM68KLibraries "{MPW}Libraries:CFM68KLibraries:"
  184.             Export CFM68KLibraries
  185. end
  186.             
  187. #    {SharedLibraries} - Directory that contains "fat" PEF-format import libraries.         
  188. if ¬ "{SharedLibraries}"
  189.             Set SharedLibraries "{MPW}Libraries:SharedLibraries:"
  190.             Export SharedLibraries
  191. end
  192.             
  193. #    {FWSOMIncludes} - The path to the SOM Includes Folder.
  194.         Set FWSOMIncludes "{MPW}Interfaces:SOMIncludes:"
  195.         Export FWSOMIncludes
  196.  
  197. #    {FWBldType} - Should be either "Debug" or "Release".  -- [sfu]
  198. #    ("Debug" by default. Override this value in your "Build" script if needed.)
  199.         Set FWBldType "Debug"
  200.         Export FWBldType
  201.  
  202. #    {Commands} - Directories to search for commands.
  203.         Set Commands "{FWToolsDir},{Commands}"
  204.         Export Commands
  205.         
  206. # Useful aliases for MPW based builds
  207.  
  208. Alias FWBuildDebugCW    '"{FWToolsDir}FWAsBuildCW" && SendAE -t "FWAsBuildCW" -m 1 -e odf_ball ----- "[1,1,1]"'
  209. Alias FWBuildReleaseCW    '"{FWToolsDir}FWAsBuildCW" && SendAE -t "FWAsBuildCW" -m 1 -e odf_ball ----- "[0,1,1]"'
  210.  
  211.